<!-- 商品管理 -->
<?php
include 'app-begin.php';
?>
<main class="body-data">
    <div class="panel">
        <div class="panel_cancel">取消</div>
        <form action="../Model/UserCheck.php" method="post">
            <div class="all_form">
                <input type="text" name="username" required placeholder="请输入用户名此项为必填项！">
                <input type="password" name="password" required placeholder="请输入密码此项为必填项！">
                <input type="email" name="user_email" required placeholder="请输入邮箱！">
                <input type="text" name="user_age" required placeholder="请输入年龄此项为必填项！">
                <input type="text" name="user_sex" required placeholder="请输入性别">
                <input type="tel" name="user_tel" required placeholder="请输入电话此项为必填项！">
                <input type="text" name="user_address" required placeholder="请输入地址此项为必填项！">
            </div>
            <div class="all_button">
                <button class="panel_reset" type="reset">重置</button>
                <button class="panel_submit" type="submit">提交</button>
            </div>
        </form>
    </div>

    <div id="window_table">
        <div class="add_data_button">添加</div>
        <table border="1">
            <caption>用户管理页面</caption>
            <thead>
                <tr>
                    <td>序号</td>
                    <td>用户名</td>
                    <td>用户密码</td>
                    <td>邮箱</td>
                    <td>年龄</td>
                    <td>性别</td>
                    <td>电话</td>
                    <td>地址</td>
                    <td colspan="2">操作</td>
                </tr>
            </thead>
            <tbody>
                <?php
                include __DIR__ . '/../Controller/user.php';
                foreach ($allData as $k => $v) {
                    echo "<tr>";
                    foreach ($v as $value) {
                        echo "<td>";
                        echo $value;
                        echo "</td>";
                    }
                    echo "<td><a id='modify'  href='javascript:modifyUser({$v["user_id"]})'>修改</a></td>";
                    echo "<td><a href='javascript:delUser({$v["user_id"]})'>删除</a></td>";
                    echo "</tr>";
                }
                ?>

            </tbody>
        </table>
    </div>
</main>
<script src="../assets/js/user.js"></script>


<?php
include 'app-end.php';

?>